package com.chianghao.rock.system.dao.organization;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.chianghao.core.mybatis.sql.SqlWrapper;
import com.chianghao.core.mybatis.sql.db_enum.SqlOperators;
import com.chianghao.rock.system.entity.Organization;

@Component
public class OrganizationDao{

	
	@Autowired
	OrganizationMapper mapper;
	
	
	public List<Organization> queryByIds(List<Long> orgList) {
		Long[] params  = orgList.toArray(new Long[orgList.size()]);
		return this.mapper.queryList(new SqlWrapper().addCondition(Organization::getId,SqlOperators.in, params));
	}

}